﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using Business.IManager;
using Business.Manager;
using Entity;

namespace OnlinePayment.Admin
{
    public partial class Login : System.Web.UI.Page
    {
        IAccountManager accountManager = new AccountManager();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

            }
        }



        protected void lnkLogin_Click(object sender, EventArgs e)
        {
            string code = txtYzm.Text.ToLower().ToString().Trim();
            //txtYzm.Text = Session["code"].ToString();

            //test
           SysAdmin admin = new SysAdmin();
            admin.LoginId = "Admin";
            admin.LoginPwd = "Admin";
            Session["Admin"] = admin;
            Response.Redirect("./BGIndex.aspx");
            ////////////////////////////////////////////////

            
           /* if (Session["code"].ToString().Equals(code))   //验证验证码
            {
                SysAdmin admin = new SysAdmin();
                admin.LoginId = txtname.Value.ToString();
                //admin.LoginPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(txtpwd.Value.ToString(), "md5");
                admin.LoginPwd = txtpwd.Value.ToString();
                if (!Object.Equals(accountManager.adminLogin(admin),null)) //判断拥有该用户名和密码的用户是否存在
                {
                    //txtYzm.Text = Session["code"].ToString();
                    Session["Admin"] = admin;
                    Response.Redirect("./BGIndex.aspx");
                }

            }*/
        }


    }
}